package cn.edu.wynu.oop.object;

import cn.edu.wynu.oop.override.Student;

public class Student1 {
    int age;
    String name;
    String LearnId;

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }

    public String getLearnId() {
        return LearnId;
    }

    public Student1(int age, String name, String learnId) {
        this.age = age;
        this.name = name;
        LearnId = learnId;
    }

    @Override
    public boolean equals(Object object) {
        Student1 student = (Student1) object;
        boolean bAge = this.age == student.age;
        boolean bName = this.name == student.name;
        boolean bLearnId = this.getLearnId() == student.LearnId;
        return bName && bAge && bLearnId;
    }
}
